package com.adjaisd.scarecrow.service;

import com.adjaisd.scarecrow.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author adjaisd
 * @since 2022-03-05
 */
@Mapper
public interface UserService extends IService<User> {

    boolean existUser(String account, String password);

    boolean existUserByUsername(String username);

    boolean existUserByAccount(String account);

    User getUserById(long id);

    User getUserByAccount(String account);

    User getUserByUsername(String username);

    int addNewUser(User user);

    boolean updateUserinfoById(long userId, String account, String sex, Long birthday, String signature);

    boolean updateAvatarById(long userId, String avatar);
}
